package system.model.converter;

import common.model.po.SysTopicComment;
import system.model.request.SaveTopicCommentRequest;

/**
 * 在此填写类的用途、注意事项等
 *
 * @author 米泽鹏
 * @since 2021-08-08 下午 8:41
 */
public class SysTopicCommentConverter {

	public static SysTopicComment saveRequestToPo(SaveTopicCommentRequest saveTopicCommentRequest) {
		if (saveTopicCommentRequest == null) {
			return null;
		}
		SysTopicComment sysTopicComment = new SysTopicComment();
		sysTopicComment.setTopicId(saveTopicCommentRequest.getTopicId());
		sysTopicComment.setParentId(saveTopicCommentRequest.getParentId());
		sysTopicComment.setUserId(saveTopicCommentRequest.getUserId());
		sysTopicComment.setNickname(saveTopicCommentRequest.getNickname());
		sysTopicComment.setReplyToUserId(saveTopicCommentRequest.getReplyToUserId());
		sysTopicComment.setReplyToNickname(saveTopicCommentRequest.getReplyToNickname());
		sysTopicComment.setContent(saveTopicCommentRequest.getContent());
		sysTopicComment.setSort(saveTopicCommentRequest.getSort());
		sysTopicComment.setId(saveTopicCommentRequest.getId());
		return sysTopicComment;
	}

}
